-module(user_login).
-compile(export_all).


index('GET', Req) ->
    template:render_html(Req, "user/login", []);

index('POST', Req) ->
    PostData = Req:parse_post(),
    Username = proplists:get_value("username", PostData, ""),
    Password = proplists:get_value("password", PostData, ""),
    Isexist = model_user:checkUserExist(Username),
    template:render_html(Req, "user/login", [{isexist, Isexist}]).

